package com.example.configurationClass;

import com.example.entity.Employee;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;

/**
 * Writer: Serene Dream
 * Time: 2025/9/15 : 21:51
 * Explanation:
 */

@Configuration
public class EmployeeConfiguration {

    @Bean(name = "employee")
    public Employee employee() {
        ArrayList<String> hobbies = new ArrayList<>();
        hobbies.add("读书");
        hobbies.add("画画");
        hobbies.add("编程");
        return new Employee("11211", "1987-08-21", hobbies);
    }
}
